﻿using System.ComponentModel.DataAnnotations;

namespace Tanmia.Warehouse.Core
{
    public partial class Section
    {
        public virtual bool IsSelected { get; set; }

        [Display(ShortName = "نوع القسم", Order = 1, AutoGenerateField = true)]
        public virtual string SectionTypeName
        {
            get { return SectionType.Name; }
        }

        [Display(ShortName = "الفرع", Order = 2, AutoGenerateField = true)]
        public virtual string BranchName
        {
            get { return Branch.Name; }
        }

        [Display(ShortName = "التابع", Order = 7, AutoGenerateField = true)]
        public virtual string ParentName
        {
            get { return Parent == null ? Section.HeadName : Parent.Name; }
        }
    }
}
